package com.woniuxy.aimcpserver;

import com.woniuxy.aimcpserver.tools.DoctorService;
import com.woniuxy.aimcpserver.tools.FoodService;
import com.woniuxy.aimcpserver.tools.WeatherService;
import com.woniuxy.aimcpserver.tools.testService;
import org.springframework.ai.tool.ToolCallbackProvider;
import org.springframework.ai.tool.method.MethodToolCallbackProvider;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;
import org.springframework.web.client.RestClient;

@SpringBootApplication
public class AiMcpserverApplication {

    public static void main(String[] args) {
        SpringApplication.run(AiMcpserverApplication.class, args);
    }
    @Bean
    public ToolCallbackProvider weatherTools(WeatherService weatherService){

        return MethodToolCallbackProvider.builder().toolObjects(weatherService).build();
    }
    @Bean
    public ToolCallbackProvider testTools(testService testService){

        return MethodToolCallbackProvider.builder().toolObjects(testService).build();
    }
    @Bean
    public ToolCallbackProvider foodTools(FoodService foodService){

        return MethodToolCallbackProvider.builder().toolObjects(foodService).build();
    }
    @Bean
    public ToolCallbackProvider doctorTools(DoctorService doctorService){
        return MethodToolCallbackProvider.builder().toolObjects(doctorService).build();
    }
//
    @Bean
    public RestClient.Builder restClientBuilder() {
        return RestClient.builder();
    }


}
